package com.qf.config;

import com.qf.pojo.UserExt;
import lombok.AllArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置式 改 注解式
 * @author lixu
 */
@Configuration //配置类   UserExt
public class UserExtConfig {


    /**
     * 创建UserExt对象的同时 并赋值
     *     <bean id="userExt" class="com.qf.pojo.UserExt">
     *         <property name="age" value="123"/>
     *     </bean>
     * @return
     */
    @Bean
    public UserExt userExt(){
        UserExt userExt = new UserExt();
        userExt.setAge(123);
        //....
        return userExt;
    }

}
